package com.ym.medical.dao;

import com.ym.medical.domain.entity.SysAuditEntity;
import com.ym.medical.domain.param.PlatformAccountExampleParam;
import com.ym.medical.domain.param.SysAuditParam;
import com.ym.medical.domain.vo.SysAuditVo;
import com.ym.medical.domain.vo.TdDetailSummaryVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

/**
 * 月初出账，月底打款Dao接口
 *
 * @author ym
 * @date 2020-08-24
 */
@Repository
public interface SysAuditDao extends Mapper<SysAuditEntity> {
	/**
	 * PC端-账务系统 平台抽成金额
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	TdDetailSummaryVO tdDetailSummary(@Param("startTime") Date startTime, @Param("endTime")  Date endTime);

	/**
	 * PC端-账务系统-平台账务管理 医生消费收入记录管理
	 * @param platformAccountExampleVO
	 * @Link SysAuditModel (inclode: bankCardNo, docRealName, amount(提现金额), )
	 */
	List<SysAuditParam> listDocIncomeRecord(PlatformAccountExampleParam platformAccountExampleVO);

	/**
	 * PC端-账务系统-平台账务管理 医生消费明细主键集合
	 * @param platformAccountExampleVO
	 */
	List<Long> listDocIncomeDetailId(PlatformAccountExampleParam platformAccountExampleVO);

	/**
	 * 系统出账记录展示
	 * @param platformAccountExampleVO
	 * @return
	 */
	List<SysAuditVo> listSysAudit(PlatformAccountExampleParam platformAccountExampleVO);


	/**
	 * 批量修改
	 * @param sysAuditModel
	 * @param auditIds
	 * @return
	 */
	int updateBatchById(@Param("model") SysAuditParam sysAuditModel, @Param("ids") Long[] auditIds);

	/**
	 * 查询医生的出账记录
	 * @param sysAuditModel
	 * @return
	 */
	List<SysAuditVo> listAccountStatement(SysAuditParam sysAuditModel);

}
